Fix some minor bugs
authorIqbal Ansari <iqbalansari02@yahoo.com>
Sat, 10 Oct 2015 12:35:00 +0000 (18:05 +0530)
committerIqbal Ansari <iqbalansari02@yahoo.com>
Fri, 13 Nov 2015 17:10:05 +0000 (22:40 +0530)
which-key.el

index d14e13dba042cb743b96086cb8a6d8f95db19120..a7222ea0a6af8202ee376cf6dd0f830fcd0c3c0f 100644 (file)
@@ -1159,7 +1159,7 @@ If KEY contains any \"special keys\" defined in
 (defsubst which-key--truncate-description (desc)
   "Truncate DESC description to `which-key-max-description-length'."
   (if (and which-key-max-description-length
-           (> (string-width desc) which-key-max-description-length))
+           (> (length desc) which-key-max-description-length))
       (concat (substring desc 0 which-key-max-description-length) "..")
     desc))
 
@@ -1585,7 +1585,7 @@ Finally, show the buffer."
   (let ((formatted-keys (which-key--get-formatted-key-bindings))
         (prefix-keys (which-key--prefix-keys-description which-key--current-prefix)))
     (cond ((= (length formatted-keys) 0)
-           (message "%s-  which-key: There are no keys to show" prefix-keys-desc))
+           (message "%s-  which-key: There are no keys to show" prefix-keys))
           ((listp which-key-side-window-location)
            (setq which-key--last-try-2-loc
                  (apply #'which-key--try-2-side-windows